package com.kgc.scd.conntant;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * Created On : 2022/11/14.
 * <p>
 * Author : 刘慧枫
 * <p>
 * Description: 阿里云短信id密码配置
 */
@Component
public class AliyunConstant implements InitializingBean {

    @Value("${aliyun.sms.region_id}")
    private String regionId;

    @Value("${aliyun.sms.access_key_id}")
    private String accessKeyId;

    @Value("${aliyun.sms.secret}")
    private String secret;

    public static String REGION_ID;
    public static String ACCESS_KEY_ID;
    public static String SECRET;

    @Override
    public void afterPropertiesSet() throws Exception {
        REGION_ID = regionId;
        ACCESS_KEY_ID = accessKeyId;
        SECRET = secret;
    }
}
